<%-- 
    Document   : modificarAdministrador
    Created on : 07-may-2014, 17:29:40
    Author     : Carlos Jose Mendoza
--%>

<%@page import="modelo.DAO.AdministradorDao"%>
<%@page import="modelo.Administrador"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%! Administrador admin = new Administrador();
            AdministradorDao ad = new AdministradorDao();
        %>
        
        <%
            admin.setNombre(request.getParameter("nombre"));
            admin.setCorreo(request.getParameter("email"));
            admin.setPrimerApellido(request.getParameter("apellido1"));
            admin.setSegundoApellido(request.getParameter("apellido2"));
            admin.setBarrio(request.getParameter("barrio"));
            admin.setManzana(request.getParameter("manzana"));
            admin.setCalle(request.getParameter("calle"));
            admin.setTelefono(request.getParameter("telefono"));
            admin.setSexo(request.getParameter("sexo"));
            admin.setCiudad(request.getParameter("ciudad"));
            admin.setIdentificacionAdministrador(request.getParameter("id"));
            if(ad.modificar(admin)){
                out.print("admin modificado");
            } else {
                 out.print("admin no modificado");
            }
        %>
    </body>
</html>
